package com.tas.plugins;

import com.tas.anno.AsyncMethod;
import com.tas.manager.AsyncExtractor;
import com.tas.manager.AsyncInterceptor;
import com.tas.manager.AsyncMethodManager;
import org.noear.solon.core.AppContext;
import org.noear.solon.core.Plugin;

/**
 * 异步执行插件
 * @author kevin
 */
public class AsyncPluginImpl implements Plugin {
  @Override
  public void start(AppContext context) throws Throwable {
    AsyncMethodManager manager = new AsyncMethodManager();
    context.wrapAndPut(AsyncMethodManager.class, manager);
    context.beanInterceptorAdd(AsyncMethod.class, AsyncInterceptor.instance, 121);
//    context.beanExtractorAdd(AsyncMethod.class , new AsyncExtractor(manager));

  }
}
